
#pragma once

#include "unit.h"
#include "CCSkeletalAnimation.h"

class Bowman : public Unit {
public:
	Bowman();
	virtual ~Bowman();

	virtual void update(float ticks);

	void init(UnitInfo const & info, float unitScale);

	virtual void moveTo(const CCPoint& pos);

	virtual void startAttack();

public:

protected:
	virtual void handleStateBirth(float ticks);
	virtual void handleStateAim(float ticks);
	virtual void handleStateAttack(float ticks);
	virtual void handleStateDying(float ticks);
	virtual void handleStateIdle(float ticks);
	virtual void handleStateReload(float ticks);
	virtual void handleStateAssign(float ticks);
	virtual void handleStateWalk(float ticks);
	virtual void handleStateWalkAim(float ticks);
	virtual void handleStateWalkAttack(float ticks);
	virtual void handleStateWalkReload(float ticks);

	virtual void onAttack();
};